#ifndef DOUBLEBALLGRIDCELLRENDERER_H
#define DOUBLEBALLGRIDCELLRENDERER_H
#include <wx/grid.h>
#include <wx/dc.h>
#include "global.h"


class DoubleBallGridCellRenderer : public wxGridCellRenderer
{
    int bestWidth;
    int bestHeight;
    wxColour  oldBG;//keep origin bgcolor
    wxFont _NORMALFONT;
    bool hasEnter;//
   static int IndicateCol;//上一列不为空
   static int formCol;//上一列
   static int formRow;//保持行
    public:

        DoubleBallGridCellRenderer();
        virtual ~DoubleBallGridCellRenderer();
 void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected);
 wxGridCellRenderer *Clone() const;
 wxSize GetBestSize(wxGrid& grid,wxGridCellAttr& attr,wxDC& dc,int row, int col);
 static  int DIVIDE_COL;
 static bool FILLEDBLANK;//是否填充垂直空白部分
 static bool FILLEDDISTANCE;//是否填充水平空白部分
 static wxGridTableBase* DIRTTABLE;

protected:
    // set the text colours before drawing
    void SetTextColoursAndFont(const wxGrid& grid,
                               const wxGridCellAttr& attr,
                               wxDC& dc,
                               bool isSelected);
    private:
};

#endif // DOUBLEBALLGRIDCELLRENDERER_H
